package com.scheduling.material.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 原料数据传输对象
 *
 * @author 开发团队
 * @since 2025-05-29
 */
@Data
@Schema(description = "原料信息")
public class MaterialDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "原料ID")
    private String materialId;

    @Schema(description = "原料名称", required = true)
    @NotBlank(message = "原料名称不能为空")
    private String materialName;

    @Schema(description = "原料描述")
    private String description;

    @Schema(description = "计量单位", required = true)
    @NotBlank(message = "计量单位不能为空")
    private String unit;

    @Schema(description = "安全库存", required = true)
    @NotNull(message = "安全库存不能为空")
    @DecimalMin(value = "0", message = "安全库存不能小于0")
    private BigDecimal safetyStock;
} 